<?php
class GuildShopVo extends SzAbstractMySqlVo
{

    private $userId;
    private $pos;
    private $item;
    private $num;
    private $sale;
    private $state;
    private $createTime;
    private $updateTime;

    /**
     * Initialize GuildShopVo.
     *
     * @param $userId
     * @param $pos
     * @param $item
     * @param $num
     * @param $sale
     * @param $state
     * @param $createTime
     * @param $updateTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return GuildShopVo
     */
    public function __construct($userId, $pos, $item, $num, $sale, $state, $createTime, $updateTime, $isInsert = false) {
        $this->userId = $userId;
        $this->pos = $pos;
        $this->item = $item;
        $this->num = $num;
        $this->sale = $sale;
        $this->state = $state;
        $this->createTime = $createTime;
        $this->updateTime = $updateTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'GuildShopVo';
        $this->ormName = 'GuildShop';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'pos' => $this->getPos(),
            'item' => $this->getItem(),
            'num' => $this->getNum(),
            'sale' => $this->getSale(),
            'state' => $this->getState(),
            'createTime' => $this->getCreateTime(),
            'updateTime' => $this->getUpdateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'pos' => $this->getPos(),
            'item' => $this->getItem(),
            'num' => $this->getNum(),
            'sale' => $this->getSale(),
            'state' => $this->getState(),
            'createTime' => $this->getCreateTime(),
            'updateTime' => $this->getUpdateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getPos(),
            $this->getItem(),
            $this->getNum(),
            $this->getSale(),
            $this->getState(),
            $this->getCreateTime(),
            $this->getUpdateTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getPos()
    {
        return $this->pos;
    }

    public function setPos($val)
    {
        $this->saveColumnStatus(1, $this->pos);
        $this->pos = $val;
    }

    public function getItem()
    {
        return $this->item;
    }

    public function setItem($val)
    {
        $this->saveColumnStatus(2, $this->item);
        $this->item = $val;
    }

    public function getNum()
    {
        return $this->num;
    }

    public function setNum($val)
    {
        $this->saveColumnStatus(3, $this->num);
        $this->num = $val;
    }

    public function getSale()
    {
        return $this->sale;
    }

    public function setSale($val)
    {
        $this->saveColumnStatus(4, $this->sale);
        $this->sale = $val;
    }

    public function getState()
    {
        return $this->state;
    }

    public function setState($val)
    {
        $this->saveColumnStatus(5, $this->state);
        $this->state = $val;
    }

    public function getCreateTime()
    {
        return $this->createTime;
    }

    public function setCreateTime($val)
    {
        $this->saveColumnStatus(6, $this->createTime);
        $this->createTime = $val;
    }

    public function getUpdateTime()
    {
        return $this->updateTime;
    }

    public function setUpdateTime($val)
    {
        $this->saveColumnStatus(7, $this->updateTime);
        $this->updateTime = $val;
    }

}